package cn.gson.boot.model.dao;

import cn.gson.boot.model.pojos.Fahuo;
import cn.gson.boot.model.pojos.Kefu;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import javax.transaction.Transactional;

public interface KeFuDao extends CrudRepository<Kefu,Integer> {
    //移除客服（逻辑删除）
    @Transactional
    @Modifying(clearAutomatically = true)
    @Query(nativeQuery = true,value = "update kefu set kf_ys = 0 where kf_id=?1")
    public void yichuKeFu(Integer kfId);
}
